cardText = [str(number) for number in range(2,11)] + ['J ','Q ','K ','A ']
cardSuit = ['♠ ','♣ ','♡ ','♢ ']
cardDict = {s + t:cardText.index(t) for t in cardText for s in cardSuit}
cardDict.update({'Joke-':12,'Joke+':13})
print(cardDict)
oneSetCard = [s + t for t in cardText for s in cardSuit] + ['Joke-','Joke+']
import random
for c in range(len(oneSetCard)):
    oneSetCard.append(oneSetCard.pop(random.randint(0,len(oneSetCard)-1)))
myCard = oneSetCard[int(input('牌已经洗好,输入您选第几张(0-53):'))]
robotCard = oneSetCard[random.randint(0,len(oneSetCard)-1)]
print('您抽中的是%s,计算机抽的是%s'%(myCard,robotCard))
if cardDict[myCard] > cardDict[robotCard]:
    print('您赢了')
elif cardDict[myCard] == cardDict[robotCard]:
    print('平局')
else:
    print('您输了')

'''运行如下
牌已经洗好,输入您选第几张(0-53):3
您抽中的是♣ 4,计算机抽的是♣ A 
您输了
'''
